<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: pico_stdio_usb</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__pico__stdio__usb.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">pico_stdio_usb<div class="ingroups"><a class="el" href="group__runtime.html">Runtime Infrastructure</a> &raquo; <a class="el" href="group__pico__stdio.html">pico_stdio</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Support for stdin/stdout over USB serial (CDC)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab87bcfa3f24e5a3fe92a944f9eecc460"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__usb.html#gab87bcfa3f24e5a3fe92a944f9eecc460">stdio_usb_init</a> (void)</td></tr>
<tr class="memdesc:gab87bcfa3f24e5a3fe92a944f9eecc460"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly initialize USB stdio and add it to the current set of stdin drivers.  <a href="group__pico__stdio__usb.html#gab87bcfa3f24e5a3fe92a944f9eecc460">More...</a><br /></td></tr>
<tr class="separator:gab87bcfa3f24e5a3fe92a944f9eecc460"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a1edc699811e2dc3c119e8b00edc038"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__usb.html#ga1a1edc699811e2dc3c119e8b00edc038">stdio_usb_deinit</a> (void)</td></tr>
<tr class="memdesc:ga1a1edc699811e2dc3c119e8b00edc038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly deinitialize USB stdio and remove it from the current set of stdin drivers.  <a href="group__pico__stdio__usb.html#ga1a1edc699811e2dc3c119e8b00edc038">More...</a><br /></td></tr>
<tr class="separator:ga1a1edc699811e2dc3c119e8b00edc038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga86edc8e3a477bb388ae73d92a3e87824"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__usb.html#ga86edc8e3a477bb388ae73d92a3e87824">stdio_usb_connected</a> (void)</td></tr>
<tr class="memdesc:ga86edc8e3a477bb388ae73d92a3e87824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if there is an active stdio CDC connection to a host.  <a href="group__pico__stdio__usb.html#ga86edc8e3a477bb388ae73d92a3e87824">More...</a><br /></td></tr>
<tr class="separator:ga86edc8e3a477bb388ae73d92a3e87824"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Support for stdin/stdout over USB serial (CDC) </p>
<p >Linking this library or calling <code>pico_enable_stdio_usb(TARGET ENABLED)</code> in the CMake (which achieves the same thing) will add USB CDC to the drivers used for standard input/output</p>
<p >Note this library is a developer convenience. It is not applicable in all cases; for one it takes full control of the USB device precluding your use of the USB in device or host mode. For this reason, this library will automatically disengage if you try to using it alongside <a class="el" href="group__tinyusb__device.html">tinyusb_device</a> or <a class="el" href="group__tinyusb__host.html">tinyusb_host</a>. It also takes control of a lower level IRQ and sets up a periodic background task.</p>
<p >This library also includes (by default) functionality to enable the RP-series microcontroller to be reset over the USB interface. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga86edc8e3a477bb388ae73d92a3e87824" name="ga86edc8e3a477bb388ae73d92a3e87824"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga86edc8e3a477bb388ae73d92a3e87824">&#9670;&nbsp;</a></span>stdio_usb_connected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool stdio_usb_connected </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if there is an active stdio CDC connection to a host. </p>
<dl class="section return"><dt>Returns</dt><dd>true if stdio is connected over CDC </dd></dl>

</div>
</div>
<a id="ga1a1edc699811e2dc3c119e8b00edc038" name="ga1a1edc699811e2dc3c119e8b00edc038"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a1edc699811e2dc3c119e8b00edc038">&#9670;&nbsp;</a></span>stdio_usb_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool stdio_usb_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly deinitialize USB stdio and remove it from the current set of stdin drivers. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the USB CDC was deinitialized, false if an error occurred </dd></dl>

</div>
</div>
<a id="gab87bcfa3f24e5a3fe92a944f9eecc460" name="gab87bcfa3f24e5a3fe92a944f9eecc460"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab87bcfa3f24e5a3fe92a944f9eecc460">&#9670;&nbsp;</a></span>stdio_usb_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool stdio_usb_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly initialize USB stdio and add it to the current set of stdin drivers. </p>
<p >PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS can be set to cause this method to wait for a CDC connection from the host before returning, which is useful if you don't want any initial stdout output to be discarded before the connection is established.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the USB CDC was initialized, false if an error occurred</dd></dl>
<p>Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</p>
<p >SPDX-License-Identifier: BSD-3-Clause </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>